<?php include_once 'group_header.php';?>

	<div class="main_left">
    	<div class="group_top">
        	<ul class="g_plist">
			<?php foreach( $qun_list as $qun_list ){ ?>
            	<li>
					<a href="index.php?mod=qun&qid=<?php echo $qun_list['qid'];?>"><img src="<?php echo $qun_list['icon']; ?>" width="150" height="151" />
					<div class="info">
						<strong><?php echo $qun_list['name'];?></strong>
						<span>成员： <?php echo $qun_list['member_num'];?>人</span>
					</div>
					</a>
              	</li>
			<?php } ?>
          </ul>
        </div>
        
        <!--推荐微群-->
		<div class="group_c">
        	<h2>推荐微群</h2>
            <div class="group_type">
				<a id="list_all" href="#" class="on">全部</a>
			<?php foreach( $qun_cate as $key=>$value ){ ?>
				<a id="<?php echo $key;?>" href="#"><?php echo $value['cat_name'];?></a>
			<?php } ?>
            </div>
            <div class="group_list">
            	<ul id="s_list_all" class="g_plist2">
				<?php foreach($qun_list_all as $qun_list_all){ ?>
				
                    <li>
                    	<a href="index.php?mod=qun&qid=<?php echo $qun_list_all['qid'] ;?>" class="pic"><img src="<?php echo $qun_list_all['icon'];?>" /></a>
                        <a href="index.php?mod=qun&qid=<?php echo $qun_list_all['qid'] ;?>" class="but_a">加入</a>
                    	<h3><a href="index.php?mod=qun&qid=<?php echo $qun_list_all['qid'];?>"><?php echo $qun_list_all['name'] ;?></a></h3> 
                        <p>创建者： <?php echo $qun_list_all['foundername'];?> | 成员数： <?php echo $qun_list_all['member_num'];?> 人  </p> 
                    </li>
				<?php } ?>
                </ul>
                <div class="float_both"></div>
			<?php foreach( $qun_cate as $key=>$value ){ ?>
			
            	<ul id="s_<?php echo $key; ?>" class="g_plist2" style="display:none;">
				<?php foreach($qun_all[$key] as $qunlist){ ?>
				
                    <li>
                    	<a href="index.php?mod=qun&qid=<?php echo $qunlist['qid'] ;?>" class="pic"><img src="<?php echo $qunlist['icon'];?>" /></a>
                        <a href="index.php?mod=qun&qid=<?php echo $qun_list_all['qid'] ;?>" class="but_a">加入</a>
                    	<h3><a href="index.php?mod=qun&qid=<?php echo $qunlist['qid'];?>"><?php echo $qunlist['name'] ;?></a></h3> 
                        <p>创建者： <?php echo $qunlist['foundername'];?> | 成员数： <?php echo $qunlist['member_num'];?> 人  </p> 
                    </li>
				<?php } ?>
                </ul>
                <div class="float_both"></div>
			<?php } ?>
			</div>
        </div><!--推荐微群-->
    </div>
<script type="text/javascript">
$(function(){
	$(".group_type a").click(function(){
		$(".group_type a").removeClass("on");
		$(this).addClass("on");
		$(".group_list ul").hide();
		$("#s_"+$(this).attr("id")).show();
	});
});
</script>
<?php include_once 'group_right.php';?>
